home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DS-CD ROM 2 1993 August
/
DS CD-ROM 2.Ausgabe (August 1993).iso
/
programm
/
ds0045
/
spritsrc.exe
/
SPR_DEMO.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-08-30
|
3KB
|
115 lines
program sprite_test;
uses drv_link,crt,graph,spritlib;
var nummer : integer;
gd,gm : integer;
t,u : integer;
x,y : integer;
dx,dy : integer;
s1,s2 : string;
modestr : string;
begin
gd:=0;
initgraph (gd,gm,'');
if (gd=1) or (gd=2) or (gd=7) then modestr:='.MON' else modestr:='.COL';
load_sprite('S_E_U_K'+modestr,nummer);
load_sprite('S_E_U_K'+modestr,nummer);
load_sprite('S_E_U_K'+modestr,nummer);
load_sprite('S_E_U_K'+modestr,nummer);
load_sprite('S_E_U_K'+modestr,nummer);
load_sprite('z'+modestr,nummer);
load_sprite('e'+modestr,nummer);
load_sprite('i'+modestr,nummer);
load_sprite('g'+modestr,nummer);
load_sprite('t'+modestr,nummer);
show_sprite(0,getmaxx div 2,getmaxy div 2,0,0);
show_sprite(1,getmaxx div 2 -1,getmaxy div 2,1,0);
show_sprite(2,getmaxx div 2,getmaxy div 2 -1,3,0);
show_sprite(3,getmaxx div 2 -1,getmaxy div 2 -1,2,0);
dx:=(getmaxx div 2 -33) div 25;
dy:=(getmaxy div 2 -33) div 25;
for t:=1 to 25 do for u:=0 to 3 do begin
sound(75+t*10);
case u of
0 : begin
x:=getmaxx div 2 + t*dx;
y:=getmaxy div 2 + t*dy;
end;
1 : begin
x:=getmaxx div 2 - 1 - t*dx;
y:=getmaxy div 2 + t*dy;
end;
2 : begin
x:=getmaxx div 2 + t*dx;
y:=getmaxy div 2 - 1 - t*dy;
end;
3 : begin
x:=getmaxx div 2 - 1 - t*dx;
y:=getmaxy div 2 - 1 - t*dy;
end;
end;
move_sprite(u,x,y);
nosound;
end;
show_sprite(4,getmaxx div 2-16,getmaxy div 2-16,0,0);
line (60,16,getmaxx-60,16);
line (60,getmaxy-16,getmaxx-60,getmaxy-16);
line (16,60,16,getmaxy-60);
line (getmaxx-16,60,getmaxx-16,getmaxy-60);
for t:=325 downto 20 do begin
sound(t);
delay(3-t div 100);
end;
nosound;
delay(500);
s1:='SOFTWARE-ENTWICKLUNG' ; s2:='UWE KUHRING' ;
for t:=1 to 20 do begin
outtextxy(getmaxx div 2+(t*2-22)*textwidth('A'),getmaxy div 2 -60,copy(s1,t,1));
sound (20);
delay (60);
nosound;
delay(40);
end;
for t:=1 to 11 do begin
outtextxy(getmaxx div 2+(t*2-12)*textwidth('A'),getmaxy div 2 -40,copy(s2,t,1));
sound (20);
delay (60);
nosound;
delay (40);
end;
dx:=getmaxx div 20 ; dy:= getmaxy div 20;
show_sprite(5,dx*8,dy*13,0,0);
sound (60) ; delay(50) ; nosound ; delay(75);
show_sprite(6,dx*9,dy*13,0,0);
sound (60) ; delay(50) ; nosound ; delay(75);
show_sprite(7,dx*10,dy*13,0,0);
sound (60) ; delay(50) ; nosound ; delay(75);
show_sprite(8,dx*11,dy*13,0,0);
sound (60) ; delay(50) ; nosound ; delay(75);
show_sprite(9,dx*12,dy*13,0,0);
sound (60) ; delay(50) ; nosound ; delay(75);
s1:='SPRITLIB V1.2 - Sprites für Turbo-Pascal';
s2:='-Shareware-' ;
for t:=1 to 40 do begin
outtextxy(getmaxx div 2+(t-21)*textwidth('A'),dy*17,copy(s1,t,1));
sound (75);
delay (5);
nosound;
delay(40);
end;
for t:=1 to 11 do begin
outtextxy(getmaxx div 2+(t-7)*textwidth('A'),dy*18,copy(s2,t,1));
sound (50);
delay (5);
nosound;
delay (40);
end;
repeat until keypressed;
for t:=0 to 9 do begin
hide_sprite(t);
unload_sprite(t);
end;
closegraph;
end.